-- dragon_magic.lua
-- created by huanghr
-- 进入下一层收集N点龙血

return {
    apply = function(prop, baseValue)
        return prop[3];
    end,
    -- 触发
    trigger = function(who, prop, targetPos)

        if who.type ~= OBJECT_TYPE_USER then
            return;
        end

        -- 累计能量
        local energy = prop[2];
        local value = tonumber(prop[3]);

        DungeonServiceM.addDungeonAttrib(energy, value);

        return value;
    end,

    record = function(target, prop, path)
        return false;
    end
};